﻿using System;
using System.Globalization;

namespace Framework.IISUtility
{
    public class IISWebVirtualDir
    {
        /// <summary>
        ///
        /// </summary>
        public IISWebServer Parent = null;

        /// <summary>
        /// 虚拟目录名称
        /// </summary>
        public string Name = "Way";

        /// <summary>
        /// 读取
        /// </summary>
        public bool AccessRead = true;

        /// <summary>
        /// 脚本支持
        /// </summary>
        public bool AccessScript = true;

        /// <summary>
        /// 物理路径
        /// </summary>
        public string Path = @"c:\";

        /// <summary>
        /// 默认文档
        /// </summary>
        public string DefaultDoc = "index.aspx";

        /// <summary>
        /// 使用默认文档
        /// </summary>
        public bool EnableDefaultDoc = true;

        /// <summary>
        /// 所属的网站的网站说明
        /// </summary>
        public string WebServer = "";


        /// <summary>
        ///
        /// </summary>
        /// <param name="WebServerName"></param>
        public IISWebVirtualDir(string WebServerName)
        {
            if (WebServerName.ToString(CultureInfo.InvariantCulture) == "")
                throw (new Exception("WebServerName不能为空!"));
            WebServer = WebServerName;
        }

        /// <summary>
        ///
        /// </summary>
        public IISWebVirtualDir()
        {

        }
    }
}
